package cn.kxx.controller;


import cn.kxx.entity.Result;
import cn.kxx.pojo.AppointmentInfo;
import cn.kxx.service.AppointmentService;
import feign.Param;
import io.swagger.annotations.Api;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api("预约列表")
@RestController
@RequestMapping("/appointment")
public class AppointmentController {

    @Reference
    private AppointmentService appointmentService;

    /**
     * @return {@link Result}
     */
    @GetMapping("/findAll")
    public Result findAll(){


      List<AppointmentInfo> list = appointmentService.findAll();
      return new Result(true,"预约列表查询成功",list);


    }
    @GetMapping("/findAll1")
    public Result findAll1(@Param("str") String str){



        List<AppointmentInfo> list = appointmentService.findAll1(str);
      return new Result(true,"预约列表查询成功",list);


    }
}
